<div class="layui-fluid" id="VIEW-list-table" lay-title="客户查询明细">
    <div class="layui-row layui-col-space10">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">筛选数据</div>
                <div class="layui-card-body">
                    <form class="layui-form" lay-filter="lig-customerEventDetail-searchform">
                        <div class="layui-inline">
                                <label class="layui-form-label" style="width:85px;">起止时间</label>
                                <div class="layui-inline">
                                    <input type="text" name="startTime" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-inline">--</div>
                                <div class="layui-inline">
                                    <input type="text" name="endTime" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        <div class="layui-inline">
                            <input type="button" class="layui-btn layui-btn-sm" lay-filter="lig-customerEventDetail-search" lig-lang="btn-search" value="查询">
                            <button type="reset" class="layui-btn layui-btn-sm layui-btn-primary" lig-lang="btn-reset">重置</button>
                        </div>
                    </form>
                </div>
            </div>
            <div class="layui-card">
                <div class="layui-card-body">
                    <table lay-filter="lig-customerEventDetail-table"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use(['admin', 'table', 'form', 'laydate', 'laytpl', 'jquery','lig'], function (admin, table, form, laydate, laytpl, $, lig) {
        var _searchForm = '[lay-filter="lig-customerEventDetail-searchform"]';
        laydate.render({
            elem: _searchForm + ' input[name="startTime"]'
        });
        laydate.render({
            elem: _searchForm + ' input[name="endTime"]'
        });

        $(_searchForm + ' input[name="startTime"]').val(parent.event_detail_user.starTime);
        $(_searchForm + ' input[name="endTime"]').val(parent.event_detail_user.endTime);
        form.render();

        lig.table({
            elem: '[lay-filter="lig-customerEventDetail-table"]',
            url: 'bu/statistic/customer-event-detail?userId='+parent.event_detail_user.id,
            cols: [[
                { title: '业务员', field: 'userName', width: '20%' },
                { title: '时间', field: 'triggerTime', width: '30%' },
                { title: '查询内容', field: 'bizData', width: '50%'}

            ]]
        },{
            mode:'dialog',
            entity: 'customerEventDetail',
            primaryField: 'id'
        });

    })
</script>